home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1997 May / macformat-050.iso / Shareware Plus / Developers / Find_icon folder / Headers / DTGetIconSuite.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-01-25  |  2.2 KB  |  59 lines  |  [TEXT/CWIE]

  1. /*    ---------------------------------------------------------------------------------------------
  2.     Find_icon, code for constructing icon suites for files and folders
  3.     
  4.     by James W. Walker
  5.     preferred e-mail: <mailto:jwwalker@kagi.com>
  6.     alternate e-mail: <mailto:jwwalker@aol.com>, <jim@nisus-soft.com>
  7.     web: <http://users.aol.com/jwwalker/>
  8.     
  9.     File: DTGetIconSuite.h
  10.     
  11.     Copyright ©1997 by James W. Walker
  12.     
  13.     You may incorporate this sample code into your applications without
  14.     restriction, though the sample code has been provided "AS IS" and the
  15.     responsibility for its operation is 100% yours.
  16.     If you're going to re-distribute the source, please make it clear
  17.     that the code was descended from James W. Walker's code,
  18.     but that you've made changes.
  19.     ---------------------------------------------------------------------------------------------
  20. */
  21.  
  22. #ifndef __ICONS__
  23.     #include <Icons.h>
  24. #endif
  25.  
  26. pascal    OSErr    DTGetIconSuite(
  27. /* --> */    short vRefNum,
  28. /* --> */    IconSelectorValue iconTypes,
  29. /* --> */    OSType fileCreator,
  30. /* --> */    OSType fileType,
  31. /* <-- */    Handle *iconSuite);
  32. /*    ¶ Get an icon suite from the desktop database or the Desktop file.
  33.     The suite is returned as a newly created Handle. Your program is
  34.     responsible for disposing of the suite when it is done using the icon.
  35.     The individual icons are retrieved using the MoreFiles function
  36.     DTGetIcon.  SInce DTGetIcon does not handle "mini" icons (12x16),
  37.     DTGetIconSuite does not add "mini" icons to the suite.
  38.  
  39.     vRefNum        input:    Volume specification.
  40.     iconTypes    input:    an icon type mask, as defined in <Icons.h>.
  41.                         For instance, kSelectorAllAvailableData.
  42.     fileCreator    input:    The icon's creator type.
  43.     fileType    input:    The icon's file type.
  44.     iconSuite    output:    A Handle containing the newly created icon suite.
  45.     
  46.     Result codes include:
  47.         noErr                0        No error
  48.         nsvErr                -35        Volume not found
  49.         ioErr                -36        I/O error
  50.         paramErr            -50        Volume doesn't support this function
  51.         memFullErr            -108    iconHandle could not be allocated
  52.         desktopDamagedErr    -1305    The desktop database has become corrupted - 
  53.                                     the Finder will fix this, but if your
  54.                                     application is not running with the
  55.                                     Finder, use PBDTReset or PBDTDelete
  56.         afpItemNotFound        -5012    Information not found
  57.         noMaskFoundErr        -1000    no 'ICN#' or 'ics#' was found
  58. */
  59.